<?php

class Reservations_EditSuccessView extends SrsReservationsBaseView
{
	public function executeHtml(AgaviRequestDataHolder $rd)
	{
		$types = array('reject' => 'odrzucona', 'accept' => 'zaakceptowana', 'close' => 'zamknięta');

		$this->user->setFlash(sprintf('Rezerwacja została %s.', $types[$rd->getParameter('type')]));

		if ($rd->hasParameter('referer'))
		{
			$this->redirectUrl($rd->getParameter('referer'));
   	}
		else
		{
			$this->redirect('reservation.browse', array('hall' => $rd->getParameter('hall')));
		}
	}
}